import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex)
export default new Vuex.Store({
  state: {
    isLogin: false,
    username: '',
  },
  mutations: {
    login(state) {
      state.isLogin = true;
    },
    logout(state) {
      state.isLogin = false;
    },
    setUsername(state, newName) {
      state.username = newName;
    }
    // s1(state, survey) {
    //   state.survey = survey
    // },
    // s2(state, counter) {
    //   state.counter = counter
    // },
    // s3(state, newPos) {
    //   state.newPos = newPos
    // },
    // s4(state, oldPos) {
    //   state.oldPos = oldPos
    // },
    // s5(state, needOrder) {
    //   state.needOrder = needOrder
    // },
    // s6(state, titleContent) {
    //   state.titleContent = titleContent
    // },
    // s7(state, info) {
    //   state.info = info
    // }
  },
  actions: {},
  modules: {},
});
